#!/usr/bin/evn python
# -*- coding: UTF-8 -*-
# @File: main_page.py
# @Author: fy
# @date: 2021/10/21 14:39
from appium.webdriver.common.mobileby import MobileBy

from pages.base_page import BasePage
from pages.diemiao_page import DieMiaoPage


class MainPage(BasePage):

    def click_hongbao(self):
        '''
        点击淘宝主页的 20亿红包
        :return:
        '''
        hongbao_locator = (MobileBy.ACCESSIBILITY_ID, "20亿红包")
        self.find_and_click(hongbao_locator)
        return DieMiaoPage(self.driver)

